function [newSkelImage ] = filter3by2Blocks( skelImage )
%FILTER3BY2bLOCKS Removes a pixel from 3 x2 blocks rom a skeleton.  

%  3x2 blocks sometimes form whenthere are branchpoints that are aadjacent
%  This function is necessary for special cases of getSkelImage functionality.  



%Create a mask that has a 1 that identifies a single pixel in each 3 x 2 block
 mask1 = conv2(double(skelImage),ones(2,3), 'same');
 mask1(mask1 < 6) = 0;
 mask1( mask1 == 6)= 1;
 
 mask2 = conv2(double(skelImage),ones(3,2), 'same');
 mask2(mask2 < 6) = 0;
 mask2( mask2 == 6)= 1;
 
 %Combine the masks
 mask = logical(mask1) | logical(mask2);
 
 newSkelImage = skelImage;
 newSkelImage( mask ==1 ) = 0;

end

